<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>md5</title>
</head>

<body>
<font face = "tahoma" size = 2>

<?php

include('connect.php');

$querySEL = "select * from `tai khoan`";
$result = mysql_query($querySEL, $db) or die("Error");

while ($row = mysql_fetch_array($result))
{
	$mkmh = md5($row['username']);
	$queryUPD = "update `tai khoan` set password = '$mkmh' where username= $row[username]";
	mysql_query($queryUPD, $db) or die("Error");
}

mysql_close($db);

$mk = "123456";
echo 'Mật khẩu: '.$mk;
echo '<p>';
echo 'Mật khẩu mã hóa: '.md5($mk);

?>

</font>
</body>

</html>
